import {request} from 'umi';

export async function fetchDeptList(body) {
  return request('/tenant/common/dept-list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function fetchRoleList(body) {
  return request('/tenant/common/role-list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function fetchPostList(body) {
  return request('/tenant/common/post-list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function fetchMenuList(body) {
  return request('/tenant/common/menu-list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function fetchUserList(body) {
  return request('/tenant/common/user-list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}